package com.ctgu.computer.common;

public class UserLocalTread {
    private static ThreadLocal<Integer> userIds = new ThreadLocal<>();

    private static ThreadLocal<Integer> adminIds = new ThreadLocal<>();

    public static Integer getAdminId(){
        return adminIds.get();
    }

    public static void setAdminId(Integer id){
         adminIds.set(id);
    }
    public static void clearAdminId(){
        adminIds.remove();
    }
    public static Integer getUserId(){
        return userIds.get();
    }
    public static void setUserId(Integer id){
         userIds.set(id);
    }

    public static void clearUserId(){
        userIds.remove();
    }
}
